<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Orchestrator API测试报告</title>
    <meta name="generator" content="HTMLTestRunner 0.8.2"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
    <script src="http://apps.bdimg.com/libs/Chart.js/0.2.0/Chart.min.js"></script>
    <!-- <link href="https://cdn.bootcss.com/echarts/3.8.5/echarts.common.min.js" rel="stylesheet">   -->
    
    
<style type="text/css" media="screen">
body        { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
table       { font-size: 100%; }
pre         {  }
/* -- heading ---------------------------------------------------------------------- */
h1 {
	font-size: 16pt;
	color: gray;
}
.heading {
    font-size: 12px;
    margin-top: 0ex;
    margin-bottom: 1ex;
	margin-left: 10px;
}
.heading .attribute {
    font-size: 12px;
    margin-top: 1ex;
    margin-bottom: 0;
}
.heading .description {
    font-size: 12px;
    margin-top: 4ex;
    margin-bottom: 6ex;
}
/* -- css div popup ------------------------------------------------------------------------ */
a.popup_link {
}
a.popup_link:hover {
    color: red;
}
.popup_window {
    display: none;
    position: relative;
    left: 0px;
    top: 0px;
    /*border: solid #627173 1px; */
    font-family: "Lucida Console", "Courier New", Courier, monospace;
    text-align: left;
    font-size: 12pt;
    width: 500px;
}
}
/* -- report ------------------------------------------------------------------------ */
#show_detail_line {
    margin-top: 3ex;
    margin-bottom: 1ex;
    margin-left: 10px;
}
#result_table {
    width: 80%;
    border-collapse: collapse;
    border: 1px solid #777;
    margin-left: 10px;
}
#header_row {
    font-weight: bold;T
    color: #606060;
    background-color: #f5f5f5;
    border-top-width: 10px;
    border-color: #d6e9c6;
	font-size: 12px;
}
#result_table td {
    font-size:10px
    border: 1px solid #f5f5f5;
    padding: 2px;
}
#total_row  { font-weight: bold; }
.passClass  { background-color: #d6e9c6; }
.failClass  { background-color: #faebcc; }
.errorClass { background-color: #ebccd1; }
.passCase   { color: #6c6; }
.failCase   { color: #c60; font-weight: bold; }
.errorCase  { color: #c00; font-weight: bold; }
.hiddenRow  { display: none; }
.testcase   { margin-left: 2em; }
/* -- ending ---------------------------------------------------------------------- */
#ending {
}
/* -- chars ---------------------------------------------------------------------- */
.testChars {margin-left: 150px; font-size:10px; text-align:center;}
.btn-info1 {
    color: #fff;
    background-color: #28B463;
    border-color: #d6e9c6;
}
.btn-info2 {
    color: #fff;
    background-color: #D4AC0D;
    border-color: #faebcc;
}
.btn-info3 {
    color: #fff;
    background-color: #D35400;
    border-color: #ebccd1;
}
</style>

</head>
<body>
<script language="javascript" type="text/javascript"><!--
output_list = Array();
/* level - 0:Summary; 1:Failed; 2:All */
function showCase(level) {
    trs = document.getElementsByTagName("tr");
    for (var i = 0; i < trs.length; i++) {
        tr = trs[i];
        id = tr.id;
        if (id.substr(0,2) == 'ft') {
            if (level < 1) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
        if (id.substr(0,2) == 'pt') {
            if (level > 1) {
                tr.className = '';
            }
            else {
                tr.className = 'hiddenRow';
            }
        }
    }
}
function showClassDetail(cid, count) {
    var id_list = Array(count);
    var toHide = 1;
    for (var i = 0; i < count; i++) {
        tid0 = 't' + cid.substr(1) + '.' + (i+1);
        tid = 'f' + tid0;
        tr = document.getElementById(tid);
        if (!tr) {
            tid = 'p' + tid0;
            tr = document.getElementById(tid);
        }
        id_list[i] = tid;
        if (tr.className) {
            toHide = 0;
        }
    }
    for (var i = 0; i < count; i++) {
        tid = id_list[i];
        if (toHide) {
            document.getElementById('div_'+tid).style.display = 'none'
            document.getElementById(tid).className = 'hiddenRow';
        }
        else {
            document.getElementById(tid).className = '';
        }
    }
}
function showTestDetail(div_id){
    var details_div = document.getElementById(div_id)
    var displayState = details_div.style.display
    // alert(displayState)
    if (displayState != 'block' ) {
        displayState = 'block'
        details_div.style.display = 'block'
    }
    else {
        details_div.style.display = 'none'
    }
}
function html_escape(s) {
    s = s.replace(/&/g,'&amp;');
    s = s.replace(/</g,'&lt;');
    s = s.replace(/>/g,'&gt;');
    return s;
}
/* obsoleted by detail in <div>
function showOutput(id, name) {
    var w = window.open("", //url
                    name,
                    "resizable,scrollbars,status,width=800,height=450");
    d = w.document;
    d.write("<pre>");
    d.write(html_escape(output_list[id]));
    d.write("\n");
    d.write("<a href='javascript:window.close()'>close</a>\n");
    d.write("</pre>\n");
    d.close();
}
*/
--></script>
<div class='heading'>
<h1>Orchestrator API测试报告</h1>
<p class='attribute'><strong>Testers:</strong> HaiYi</p>
<p class='attribute'><strong>Start Time:</strong> 2019-10-23 22:50:31</p>
<p class='attribute'><strong>Duration:</strong> 0:00:04.687646</p>
<p class='attribute'><strong>Status:</strong> Pass 44</p>

<p class='description'>测试环境：Develop，IP地址：http://192.168.0.103:3002</p>
</div>
<div style="float:left; margin-left: 10px; font-size:12px">
	<p> Test Case Pie charts </p>
	<a class="btn btn-xs btn-info1">-Pass-</a><br>
	<a class="btn btn-xs btn-info2">-Faild-</a><br>
	<a class="btn btn-xs btn-info3">-Error-</a><br>
</div>

<div class="testChars" style="center">
	<canvas id="myChart" width="250" height="250"></canvas>
</div>


<p id='show_detail_line' style="margin-left: 16px; font-size:12px">Show
<a href='javascript:showCase(0)' class="btn btn-xs btn-primary">Summary</a>
<a href='javascript:showCase(1)' class="btn btn-xs btn-danger">Failed</a>
<a href='javascript:showCase(2)' class="btn btn-xs btn-info">All</a>
</p>
<table id='result_table'>
<colgroup>
<col align='left' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
</colgroup>
<tr id='header_row' class="panel-title">
    <td>Test Group/Test case</td>
    <td>Count</td>
    <td>Pass</td>
    <td>Fail</td>
    <td>Error</td>
    <td>View</td>
</tr>

<tr class='passClass'>
    <td>test_cal.TestCal</td>
    <td>2</td>
    <td>2</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c1',2)">Detail</a></td>
</tr>

<tr id='pt1.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt1.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_sub</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test01_OrcLogin.TestLogin</td>
    <td>5</td>
    <td>5</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c2',5)">Detail</a></td>
</tr>

<tr id='pt2.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_login01: orc admin正常登录</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt2.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_login02: 登录失败，密码错误</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt2.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_login03: 登录失败，账户不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt2.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_login04: 登录失败，缺少username字段</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt2.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_login05: 登录失败，缺少password字段</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test02_UpdateOrcPw.TestUpdateOrcPw</td>
    <td>5</td>
    <td>5</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c3',5)">Detail</a></td>
</tr>

<tr id='pt3.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_update01: 更新密码失败：旧密码错误</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt3.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_update02: 更新密码失败：username不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt3.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_update03: 更新密码失败：缺少new_password字段</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt3.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_update04: 更新密码失败：缺少current_password字段</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt3.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_update05: 更新密码成功</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test03_CreateDBandGetList.TestCreateDBandGetList</td>
    <td>8</td>
    <td>8</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c4',8)">Detail</a></td>
</tr>

<tr id='pt4.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test01_get_db_list: 获取Tenant DB列表：Tenant DB列表为空</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test02_create_db: 创建Tenant DB，不创建auto live</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test03_create_db: 创建成功，并创建auto live</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test04_create_db: 创建失败：缺少tenant name</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test05_create_db: 创建失败：缺少db name</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.6' class='hiddenRow'>
    <td class='none'><div class='testcase'>test06_create_db: 创建失败：tenant name已被占用</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.7' class='hiddenRow'>
    <td class='none'><div class='testcase'>test07_create_db: 创建失败：db name已被占用</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt4.8' class='hiddenRow'>
    <td class='none'><div class='testcase'>test08_get_db_list: 获取Tenant DB列表</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test04_GetTenantDbData.TestGetTenantDbData</td>
    <td>6</td>
    <td>6</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c5',6)">Detail</a></td>
</tr>

<tr id='pt5.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test01_get_db_data: 通过name获取Tenant DB信息</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt5.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test02_get_db_data: 通过name获取Tenant DB信息失败：name不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt5.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test03_get_db_data: 通过db获取Tenant DB信息</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt5.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test04_get_db_data: 通过db获取Tenant DB信息失败：db不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt5.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test05_delete_db: 删除Tenant DB成功</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt5.6' class='hiddenRow'>
    <td class='none'><div class='testcase'>test06_delete_db: 删除Tenant DB失败：DB不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test05_TenantAdmin.TestTenantAdmin</td>
    <td>10</td>
    <td>10</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c6',10)">Detail</a></td>
</tr>

<tr id='pt6.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test01_get_tenant_admin_list: 获取Tenant Admin列表：为空</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test02_get_tenant_admin_info: 获取Tenant Admin信息：不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test03_cre_tenant_admin: 创建Tenant Admin</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test04_cre_tenant_admin: 创建失败：缺失username</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test05_cre_tenant_admin: 创建失败：缺失password</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.6' class='hiddenRow'>
    <td class='none'><div class='testcase'>test06_cre_tenant_admin: 创建失败：缺失tenant_name</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.7' class='hiddenRow'>
    <td class='none'><div class='testcase'>test07_cre_tenant_admin: 创建失败：username已被占用</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.8' class='hiddenRow'>
    <td class='none'><div class='testcase'>test08_cre_tenant_admin: 创建失败：tenant_name不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.9' class='hiddenRow'>
    <td class='none'><div class='testcase'>test09_get_tenant_admin_list: 获取所有Tenant Admin列表</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt6.10' class='hiddenRow'>
    <td class='none'><div class='testcase'>test10_get_tenant_admin_info: 获取Tenant Admin信息</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test06_DisEnaTenantDB.TestDisEnaTenantDB</td>
    <td>4</td>
    <td>4</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c7',4)">Detail</a></td>
</tr>

<tr id='pt7.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test01_DisTenDb: 禁用TenantDB</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt7.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test02_DisTenDbFail: 禁用TenantDB失败：不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt7.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test03_EnaTenDb: 启用TenantDB</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt7.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test04_TenDbFail: 启用TenantDB成功：不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr class='passClass'>
    <td>appdev_api.test07_BlockUnblockAdmin.TestBlockUnblockAdmin</td>
    <td>4</td>
    <td>4</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c8',4)">Detail</a></td>
</tr>

<tr id='pt8.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test01_block_account: 阻塞Tenant admin账户</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt8.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test02_block_account: 禁用TenantDB失败：不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt8.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test03_unblock_account: 疏通Tenant admin账户</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='pt8.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test04_unblock_account: 疏通Tenant admin账户失败：不存在</div></td>
    <td colspan='5' align='center'>pass</td>
</tr>

<tr id='total_row'>
    <td>Total</td>
    <td>44</td>
    <td class="text text-success">44</td>
    <td class="text text-danger">0</td>
    <td class="text text-warning">0</td>
    <td>&nbsp;</td>
</tr>
</table>

<div id='ending'>&nbsp;</div>

    <script type="text/javascript">
var data = [
	{   
	    name: 'error',
		value: 0,
		color: "#D35400",
		label: "Error",
		labelColor: 'white',
		labelFontSize: '16'
	},
	{
	    name: 'fail',
		value : 0,
		color : "#D4AC0D",
		label: "Fail",
		labelColor: 'white',
		labelFontSize: '16'
	},
	{
	    name : 'pass',
		value : 44,
		color : "#28B463",
		label : "Pass",
		labelColor: 'white',
		labelFontSize: '16'
	}			
]
var newopts = {
     animationSteps: 100,
 		animationEasing: 'easeInOutQuart',
}
//Get the context of the canvas element we want to select
var ctx = document.getElementById("myChart").getContext("2d");
var myNewChart = new Chart(ctx).Pie(data,newopts);
</script>
	
</body>
</html>
